﻿function load() {
    var tat = document.getElementById("divcopyright").innerHTML;
    var aaa = "";
    var ja = "";
    var i;
    var a = 30;
    for (i = 19; i < 58; i++) {
        ja += "<div style='overflow:hidden;width:100%;height:1px;position:absolute;text-align:center;top:" + i
        + "px;left:0px;filter:alpha(opacity=" + a + ");opacity:" + (a / 100) + "'><p style='margin:-" + (15 - (i -
        18)) + "px 0px 0px 0px'>" + tat + "</p></div>";
        a--;
    }
    document.getElementById("divcopyright").innerHTML += ja;
}

function sign() {
    if ($("#txtusername").val().trim() == "")
    {
        $("#divtip").html("请填写完整的用户名和密码！");
        $("#divtip").show();
        return;
    }

    var typestr = "0";//1.单位用户 0.普通用户
    if ($("#radioDWYH").attr("checked") == "checked") {
        typestr = "1";
    }
    if ($("#radioGRYH").attr("checked") == "checked")
    {
        typestr = "0";
    }

    $.post("../../Ashx/signcheck.ashx", { "username": $("#txtusername").val().trim(), "password": $("#txtpassword").val().trim(), "type": typestr }, function (data, textStatus) {
        if (textStatus == "success") {
            //alert(data);
            if (data == "fail") {
                $("#divtip").html("您输入的用户名、密码、用户类型不匹配，请重新输入！");
                $("#divtip").show();
            }
            //未被审核的用户
            else if (data == "wait") {
                $("#divtip").html("您还没有通过审核，请耐心等待......");
                $("#divtip").show();
            }
            //超级用户登录
            else if (data == "successsuper") {
               
                $("#divtip").html("欢迎超级用户登录");
                $("#divtip").show();
                top.location = "superadmin.aspx";
            }
            //登录成功
            else {
                top.location = "main.aspx";
            }
        }
    });
}


function hidetip()
{
    $("#divtip").hide();
}
//地图的局部刷新
function change() {
    // alert("dd");
    alert($("#DropDownList2 option:selected").text());
    alert($("#DropDownList2 option:selected").index());
    alert("cc");
}

